package com.sprucetec.live.enums;

/**
 * @author chenkai
 * @date 2020/4/1 3:22 下午
 * @description:
 */
public enum VideoTypeEnum {

    ADVANCE(0,"预告"),
    REVIEW(1,"回看"),
    LIVE(2,"直播");

    private Integer code;

    private String desc;

    VideoTypeEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static String code2Desc(Integer code) {
        for (VideoTypeEnum status : VideoTypeEnum.values()) {
            if (status.getCode().equals(code)) {
                return status.getDesc();
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
